<template>
    <div>
        <van-nav-bar title="搜索页面" left-text="返回" left-arrow @click-left="()=>{router.push('/home/sy')}" fixed/>
            <div style="height: 45px;"></div>
            <router-link :to="'/home/ss'">
                <van-search v-model="value" shape="round"  placeholder="请输入搜索关键词" />
            </router-link>
    </div>
</template>

<script setup>
import router from '@/router';
import { ref, watch } from 'vue';
import {goodsApi} from '@/api/api'

let good=ref([])
watch(value,(item){
    goodsApi().then(res=>{
    console.log('搜索',res)
    good.value=res.data.message.goods
})
})

</script>

<style lang="scss" scoped></style>